//
//  HMStatus.swift
//  微博
//
//  Created by 程双岐 on 16/9/23.
//  Copyright © 2016年 heima. All rights reserved.
//

import UIKit

class HMStatus: NSObject {
    //发微博时间
    var created_at : String?
    
    var id : Int64 = 0
    
    var text : String?
    
    var source : String?
    
    var user : HMUser?
    
    var reposts_count: Int = 0
    
    var comments_count: Int = 0
    
    var attitudes_count: Int = 0
    
    var retweeted_status: HMStatus?
    
    var pic_urls: [HMStatusPictureModel]?
    
    
    class func modelContainerPropertyGenericClass() -> [String : Any]{
        return[
            "pic_urls": HMStatusPictureModel.self
        ]
        
    }
    
//    init(dict: [String : Any]) {
//        super.init()
//        setValuesForKeys(dict)
//    }
//    
//    override func setValue(_ value: Any?, forKey key: String) {
//        if key == "user" {
//            guard let dic = value as? [String:Any] else {
//                print("user不是字典")
//                return
//            }
//            user = HMUser(dict: dic)
//        }else{
//            super.setValue(value, forKey: key)
//        }
//    }
    
//    override func setValue(_ value: Any?, forUndefinedKey key: String) {
//        
//    }
    
    

}
